﻿@using ZhouYu.DreamTour.Web.Models;
@using ZhouYu.DreamTour.Model;
@{
    var UserInfo = UserInfoContext.userInfoContext.UserInfo;
    //查询旅游团购的出发城市
    var CheckAllStartPlace = ViewBag.CheckAllStartPlace as List<Tour>;
}
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>中国梦想游--旅游团购页</title>
    <link href="~/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="~/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="~/js/imgtoggle.js"></script>
    <script type="text/javascript">
        window.onload = function () {
            var iTgl = new k_iToggle();
            iTgl.init({
                boxId: 'box',
                numId: 'num',
                imgId: 'imgs',
                isAuto: true,
                aCls: 'act',
                iCls: 'imgs1',
                direct: 'crt'
            });
            chg(iTgl, 'chg');
            _auto(iTgl, 'auto_1');

            //改变方向
            function chg(o, id) {
                $('#' + id).click(function () {
                    if (o.direct() == 'crt') {
                        o.direct('lvl');
                        $(this).text('纵向');
                    } else {
                        o.direct('crt');
                        $(this).text('横向');
                    }
                });
            }

            function _auto(o, id) {
                $('#' + id).click(function () {
                    if (o.isAuto) {
                        o.isAuto = false;
                        $(this).text('自动播放已停止');
                    } else {
                        o.isAuto = true;
                        o.auto();
                        $(this).text('自动播放');
                    }
                });
            }
        }
    </script>
    <script type="text/javascript">

        $(function () {
            var wweya_li = $("div.tab_menu ul li");
            wweya_li.click(function () {
                $(this).addClass("selected")
                    .siblings().removeClass("selected");
                var index = wweya_li.index(this);
                $("div.tab_box > div")
                    .eq(index).show(100)
                    .siblings().hide();
            }).hover(function () {
                $(this).addClass("hover");
            }, function () {
                $(this).removeClass("hover");
            });
        });
    </script>
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr">
                @if (UserInfo == null)
                {
                    <a href="/Home/User_Register">会员注册</a>
                    <span>|</span> <a href="/Home/User_Login">登录</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a>
                    @*<a>
                            欢迎你，来到新世界旅行网！
                        </a>*@
                }
                else
                {
                    <a href="/Home/User_Center">会员中心</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a> <span>|</span> <a href="/Login/LoginOut">退出</a> <span>|</span>
                    <a>
                        欢迎你，<span>@UserInfo.User_Name</span>来到新世界旅行网！
                    </a>
                }
            </div>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="~/images/logo.jpg"></div>
            <div class="rx_line"><img src="~/images/rx.jpg"></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li><a href="/Home/Index">首页</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Route">旅游路线</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Scenic">旅游景点</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/CateringAccommodation">餐饮住宿</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Traffic_DatailsOne">交通线路</a><img src="~/images/nav_line.jpg"></li>
            <li class="cur"><a href="/Home/Group">旅游团购</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Specialty">地方特产</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/AutoGenerationIntro">自动生成简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Team_Join">团队简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Itinerary_Details">行程导航</a></li>
        </ul>
    </div>
    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a href="/Home/Index">首页</a>  >> <a href="/Home/Group">旅游团购</a> </div>
        <div class="clumn_w clearfix">
            <div class="clu_zb">
                <div class="tab_menu mul_w">
                    <ul class="tab_mul">
                        <li class="selected">全自助游</li>
                        <li>途径城市设定</li>
                        <li>入住酒店设定</li>
                        <li>交通设定</li>
                        <li>线路设定</li>
                        <li>特殊需求线路</li>
                    </ul>
                </div>
                <div class="tab_box tw_tab">
                    <div>
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                    </div>
                    <div class="hide">
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                    </div>
                    <div class="hide">
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                    </div>
                    <div class="hide">
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                    </div>
                    <div class="hide">
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                    </div>
                    <div class="hide">
                        <table class="t_tab" width="250" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>入住城市</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>入住日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>离店日期</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>行程价格</td>
                                <td><select name=""></select></td>
                            </tr>
                            <tr>
                                <td>酒店位置</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>酒店名称</td>
                                <td><input name="" type="text"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a href="#">生成行程单搜索</a></td>
                            </tr>
                        </table>
                        卦
                    </div>
                </div>
            </div>
            <div class="in">
                <div class="pbox">
                    <div id="box" class="box">
                        <ul id="imgs">
                            <li><a href="#"><img src="~/images/lunbothree.jpg" width="570" height="280"></a></li>
                            <li><a href="#"><img src="~/images/lunbotwo.jpg" width="570" height="280"></a></li>
                            <li><a href="#"><img src="~/images/lunbofour.jpg" width="570" height="280"></a></li>
                            <li><a href="#"><img src="~/images/lunboone.gif" width="570" height="280"></a></li>
                        </ul>
                    </div>
                    <div class="cons">
                        <ul id="num" class="num">
                            <li class="act"><a href="#">黄金海岸</a></li>
                            <li><a href="#">绿色之滨</a></li>
                            <li><a href="#"> 花木小镇</a></li>
                            <li style="width:140px"><a href="#"> 丽江泸沽湖</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <br style="clear:both">
        </div>
        <div class="ftg1">
            <div class="ftg1_1">
                <div class="ftg1_1left">城市</div>                
                <div class="ftg1_1right">
                    <a href="#" class="f3">国内全部</a>
                    @foreach (var item in CheckAllStartPlace)
                    {
                        <a style="cursor: pointer;" class="selstartplace">@item.StartPlace</a>
                    }
                </div>
                <br style="clear:both">
            </div>
            <div class="ftg1_1">
                @*<div class="ftg1_1left">类型</div>*@
                @*<div class="ftg1_1right">
                        <a href="#" class="f3">全部类型</a>
                        <a href="#">旅游线路(2)</a>
                    </div>*@
                <br style="clear:both">
            </div>
        </div>
        <div class="ftg2">
            <div class="ftg2_1">排序：</div>
            <div class="ftg2_2"><a href="#" class="f5">默认</a><a href="#">销量&nbsp;<img src="~/images/ftgicon1.png" align="absmiddle"></a><a href="#">价格&nbsp;<img src="~/images/ftgicon1.png" align="absmiddle"></a></div>
        </div>
        <div class="ftg3">
            <div class="ftg3_top">旅游团购</div>
            <div class="ftg3_m" id="GroupChildDiv">
                @Html.Action("GroupChild");
                <br style="clear:both">
            </div>
        </div>
    </div>
</body>
</html>
<script>

    $(".selstartplace").click(function () {
        var startplace = $(this).text();
        StartPlace(startplace);
    })

    function StartPlace(StartPlace) {
        //使用ajax刷新分部视图
        $.ajax({
            url: "/Home/GroupChild?StartPlace=" + StartPlace,
            type: "post",
            dataType: "html",
            success: function (data) {//将控制器视图返回回调重新赋值于指定的标签内 此回调是必须的
                $("#GroupChildDiv").html("");
                $("#GroupChildDiv").html(data);
            }
        });
    }
</script>
